package cn.quicklydoit.service.impl;

import cn.quicklydoit.entity.LocalFile;
import cn.quicklydoit.mapper.LocalFileMapper;
import cn.quicklydoit.service.LocalFileService;
import org.springframework.stereotype.Service;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;

@Service
@Transactional(rollbackOn = Exception.class)
@ApplicationScoped
public class LocalFileImpl implements LocalFileService {

    @Inject
    LocalFileMapper mapper;

    @Override
    public LocalFile add(LocalFile localFile) {
        return mapper.save(localFile);
    }
}
